package org.ehe.erp.domain.quality.vo;

import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.ehe.erp.domain.quality.ErpQualityTask;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 质检任务视图对象
 *
 * @author zhangnn
 * @className ErpQualityTaskVo
 * @description 质检任务VO，用于数据传输和展示
 * @date 2025-09-10 15:00:00
 */
@Data
@AutoMapper(target = ErpQualityTask.class)
public class ErpQualityTaskVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;
    private String taskNo;
    private Long bomId;
    private String bomCode;
    private String bomName;
    /** 采购 订单编号 ***/
    private String orderNo;
    /** 采购 订单名称 ***/
    private String orderName;
    private Integer status;
    private Integer priority;
    private Long assignUserId;
    private String assignUserName;
    private LocalDateTime startTime;
    private LocalDateTime completeTime;
    private Integer timeoutDuration;
    private LocalDateTime timeoutAlarmTime;
    private Integer isTimeout;
    private String remark;
    private Date createTime;
    private Date updateTime;
    private String tenantId;
    private String createBy;
    private String updateBy;

    /**
     *   PENDING_SUBMIT(0,"待提交"),
     *     SUBMITTED(1,"已提交"),
     *     REJECTED(9,"已拒绝"),
     *     PROCESS(10, "审核中"), // 审核中
     *     APPROVE(20, "已审核"); // 审核通过
     */
    private String approveStatus;

    /**
     * 预估完成小时数
     */
    private Integer estimatedHours;
    /**
     * 任务截止时间
     */
    private LocalDateTime taskDeadline;

    /**
     * 任务是否超期
     */
    private String isTaskTimeout;

    /**
     * 响应是否超期：处理状态：0-未处理，1-已处理，2-已超期,3-超期未处理，4超期已处理
     * 与respondTime一样。只是统一字段
     */
    private String isOverdue;

    /**
     * 响应 截止时间
     */
    private LocalDateTime isOverdueEndTime;

}
